<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的夺宝</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm"/>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav white fs_xl" style="border-bottom: solid 1px #e1e1e1;">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">查看详情</h1>
			<a href="index.html" class="mui-icon mui-icon-home mui-pull-right"></a>
		</header>
		<div class="mui-content fs_xl">
			<div class="db_img fs_xl cls">
				<div class="db_img_lt">
					<if $indiana.is_praise == 1 && $indiana.order_status == 0>
					<div>
						<p class="fs_m">夺宝成功，待发货</p>
					</div>
					</if>
					<if $indiana.is_praise == 1 && $indiana.order_status == 1>
					<div>
						<p class="fs_m">夺宝成功，已发货</p>
						<p class="fs_s">{$indiana.shipping_info.shipping_name}：{$indiana.shipping_info.invoice_no}</p>
						<p class="fs_s"><button onclick="receipt({$indiana.id})">确认收货</button> [若15天之后还确认，系统会自动确认收货]</p>
					</div>
					</if>
					<!--<div style="display: none;">
						<p class="fs_m"><span>确认收货</span></p>
						<p class="fs_s">还是7天自动确认收货</p>
					</div>-->
					<if $indiana.is_praise == 1 && $indiana.order_status == 4>
					<div>
						<p class="fs_m">交易成功</p>
					</div>
					</if>
					<if $indiana.is_praise == 0>
					<div>
						<p class="fs_m">夺宝失败</p>
					</div>
					</if>
				</div>
				<div class="db_img_rt">
					<if $indiana.is_praise == 1 && empty($indiana.shipping_info)>
					<img class="img1" src="__STATIC__/images/db_101.png" />
					</if>
					<if $indiana.is_praise == 1 && !empty($indiana.shipping_info)>
					<img class="img2" src="__STATIC__/images/db_102.png"  style="display: none;"/>
				    </if>
				    <if $indiana.is_praise == 1 && $indiana.order_status == 4>
					<img class="img3" src="__STATIC__/images/db_103.png" />
					</if>
					<!--<img class="img4" src="__STATIC__/images/db_104.png" />-->
					<if $indiana.is_praise == 0>
					<img class="img5" src="__STATIC__/images/db_105.png" />
					</if>
				</div>
			</div>
			
			<div class="dz_xz cls">
				<div class="dz_ico">
					<i class="mui-icon mui-icon-location"></i>
				</div>
				<div class="dz_info">
					<p class="fs_m">{$address.consignee}<span>{$address.mobile}</span></p>
					<p class="fs_xs">{$address.address}</p>
				</div>
				<div class="dz_rt_ico">
					<a class="mui-icon mui-icon-arrowright" href="{:U('User/address_list',array('id'=>$indiana.id))}"></a>
				</div>
			</div>
			<div class="my_db_tit">
				<p class="fs_s">【第{$indiana.stage}期】</p>
				<p class="fs_m">{$indiana.title}</p>
				<p class="fs_m">本期中奖号码：{$indiana.win_number}</p>
			</div>
			<div class="my_db_info">
				<b class="fs_l">夺宝基本信息</b>
				<a class="fs_m">参与时间<span>{$indiana.addtime|date="Y-m-d H:i:s",###}</span></a>
				<a class="fs_m">参与次数<span>{$indiana.num}次</span></a>
			</div>
			<div class="my_dbm">
				<b>夺宝码</b>
				<foreach name="indiana[indiana_number]" item="vo" key="k">
					<if $vo==$indiana.win_number>
						<p class="fs_m">{$vo}<a class="org2 fs_s">已中奖</a></p>
						<else>
						<p class="fs_m">{$vo}<a class="fs_s">未中奖</a></p>	
						</else>
					</if>
				</foreach>
			</div>
			<div class="wq_tc">
				<div class="wq_tc_m cls">
					<div class="tc_lt"><img src="{$indiana[goods_id]|goods_thum_images=400,400}" /></div>
					<div class="tc_rt">
						<p class="tc_tit">{$indiana.goods_name}</p>
						<p class="yg_pri fs_xs"><span>¥<em class="fs_xxi">{$indiana.price}</em></span><span>¥{$indiana.shop_price}</span></p>
						<p class="zj_id fs_m">中奖ID:<span>{$indiana.nickname}</span></p>
						<p class="zj_xym fs_m">幸运码:<span>{$indiana.win_number}</span></p>
						<p class="zj_time fs_xs">{$indiana.win_time|date="Y-m-d",###}</p>
					</div>
					<div class="tc_close">
						<i class="mui-icon mui-icon-closeempty fs_xxi"></i>
					</div>
					<div class="tc_sx"></div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			mui.init();
			$(function(){
				$(".org2").click(function(){
					$(".wq_tc").show();
					$(".wq_tc_m").show();
					var marH=($(".wq_tc").height()-$(".wq_tc_m").height())/2;
					$(".wq_tc_m").css("margin-top",marH);
				});
				$(".tc_close").click(function(){
					$(".wq_tc").hide();
					$(".wq_tc_m").hide();
				})
			})
			
			function receipt(id){
				$.post("{:U('User/indiana_receipt')}",{'id':id},function(data){
					if(data.status == 1){
						layer.alert(data.msg,1);
						location.reload(true);
					}
				},'json')
			}
		</script>
	</body>

</html>